From: Stefan Monnier Date: Sat, 12 Apr 2025 15:11:38 +0000 (-0400) Subject: lisp/help.el (help-form-show): Improve last change (bug#77118) X-Git-Tag: archive/raspbian/1%30.2+1-2+rpi1^2~2^2~24^2~147 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22Program/%22http:/www.example.com/cgi/%22https:/%22Program?a=commitdiff_plain;h=17418125353ce998580ba8f0928ffd2c47af7df3;p=emacs.git lisp/help.el (help-form-show): Improve last change (bug#77118) Fill the buffer from within the `with-output-to-temp-buffer`, as before. --- diff --git a/lisp/help.el b/lisp/help.el index a06679b31f5..5cd97897767 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -2262,13 +2262,11 @@ The `temp-buffer-window-setup-hook' hook is called." "Display the output of a non-nil `help-form'." (let ((msg (eval help-form t))) (if (stringp msg) - (let ((bufname " *Char Help*")) - (with-output-to-temp-buffer bufname) + (with-output-to-temp-buffer " *Char Help*" ;; Use `insert' instead of `princ' so that keys in `help-form' ;; are displayed with `help-key-binding' face (bug#77118). - (with-current-buffer bufname - (let (buffer-read-only) - (insert msg))))))) + (with-current-buffer standard-output + (insert msg)))))) (defun help--append-keystrokes-help (str) (let* ((keys (this-single-command-keys))